<div id="dialog" style="margin-top: 5px;" >


    ${h.form(h.url(action='inviteusers'),  class_="small", id="inviteusersform")}

        ${h.text_area('emails', value=(item and item.email) or '', size="50x6")}

        <div class="actions">
            <input type="submit" class="primaryAction" id="submit" value="Submit &#187;">    &nbsp;&nbsp;
            <a href="javascript:void(0);" id="inviteusers_cancel">cancel</a>
        </div>
    ${h.end_form()}
    <br />
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $("#emails").focus();
        $("#inviteusers_cancel").click(function() {
            $("#inviteusersformdiv").hide();
            $("#actionbarusers").show();
        });
        $('#inviteusersform').submit(function() {
            $(this).ajaxSubmit({success: function(responseText, statusText)  {
                if (statusText == "success") {
                    newid = responseText;
                    $.showmessage('Users Added  ');
                    $("#inviteusersformdiv").hide();
                    //.before('<div><a href="/account/view/' + newid + "></a> \
                    //, Not Verified</div>');
                } else {
                    $.showmessage('There was an error  ' );
                }
            }});
            return false;
        });
    });
</script>



